package com.kwok.rbac.application.service;

import com.kwok.rbac.application.entity.Privilege;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 权限表 服务类
 * </p>
 *
 * @author baomidou
 * @since 2024-05-25
 */
public interface PrivilegeService extends IService<Privilege> {

    //根据角色ID给角色赋予权限(权限的批量添加)
    public Boolean privilegeToRole(Integer roleId, List<Integer> privilegeIdList);

    //根据角色ID获取角色所拥有的权限(权限的查询)
    public List<Privilege> getPrivilegeByRoleId(Integer roleId);

    //根据用户ID获取用户所拥有的权限(权限的查询)
    public List<Privilege> getPrivilegeByUserId(Integer userId);

}
